<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/V_PROC_PROCESSList.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/V_PROC_PROCESSList.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ProcessList_Id',
                footer: "Foots",
                cnName: 'V_PROC_PROCESSList',
                name: 'workbusiness/V_PROC_PROCESSList',
                url: "/V_PROC_PROCESSList/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"Process_Id":"","OperationId":"","OperationCode":""});
            const editFormOptions = ref([[{"dataKey":"工艺路线","data":[],"title":"工艺","required":true,"field":"Process_Id","type":"select"},
                               {"dataKey":"工序","data":[],"title":"工序","required":true,"field":"OperationId","type":"select"},
                               {"title":"","field":"OperationCode","type":"text"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'ProcessList_Id',title:'ProcessList_Id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Process_Id',title:'工艺',type:'guid',bind:{ key:'工艺路线',data:[]},width:110,require:true,align:'left',sort:true},
                       {field:'OperationId',title:'工序',type:'string',bind:{ key:'工序',data:[]},width:110,require:true,align:'left'},
                       {field:'TaskNameZH',title:'任务类型',type:'string',width:120,align:'left'},
                       {field:'EQUTask_Id',title:'EQUTask_Id',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'ProcessNameZH',title:'工艺',type:'string',width:120,align:'left'},
                       {field:'OperationName',title:'工序',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Equipment_Id',title:'Equipment_Id',type:'string',width:120,hidden:true,require:true,align:'left'},
                       {field:'Description',title:'Description',type:'string',width:220,align:'left'},
                       {field:'TaskCode',title:'TaskCode',type:'string',width:120,align:'left'},
                       {field:'OperationCode',title:'OperationCode',type:'string',width:120,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
